<template>
    <a-textarea v-model:value="myCode" showCount  @change="updateCode"  :rows="5"/>
</template>

<script setup>

import {computed, defineEmit, defineProps, onBeforeUnmount, onMounted, ref, useContext} from "vue";
import {storage} from "../../../utils/storage";
import * as monaco from "monaco-editor";
const props = defineProps({
  code:String,
  disabled:Boolean
})
const disableEditor = props.disable
const myCode = ref(props.code)

onMounted(()=>{
  updateCode(props.code)
})
const updateCode = (val)=>{
  storage.session.set('code',myCode.value )
}
</script>

<style scoped>

</style>
